home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / OLE2BOOK.ZIP / BASICS.ZIP / CLASSLIB / CWINDOW.CPP < prev    next >
C/C++ Source or Header  |  1993-03-16  |  1KB  |  68 lines

  1. /*
  2.  * CWINDOW.CPP
  3.  * Sample Code Class Libraries
  4.  *
  5.  * Implementation of a simple CWindow class.
  6.  *
  7.  * Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  8.  *
  9.  * Kraig Brockschmidt, Software Design Engineer
  10.  * Microsoft Systems Developer Relations
  11.  *
  12.  * Internet  :  kraigb@microsoft.com
  13.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  14.  */
  15.  
  16.  
  17. #include <windows.h>
  18. #include "classlib.h"
  19.  
  20.  
  21.  
  22. /*
  23.  * CWindow::CWindow
  24.  * CWindow::~CWindow
  25.  *
  26.  * Constructor Parameters:
  27.  *  hInst           HINSTANCE of the task owning us.
  28.  */
  29.  
  30. CWindow::CWindow(HINSTANCE hInst)
  31.     {
  32.     m_hInst=hInst;
  33.     m_hWnd =NULL;
  34.     return;
  35.     }
  36.  
  37.  
  38. CWindow::~CWindow(void)
  39.     {
  40.     if (IsWindow(m_hWnd))
  41.         DestroyWindow(m_hWnd);
  42.  
  43.     return;
  44.     }
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. /*
  52.  * CWindow::Window
  53.  *
  54.  * Purpose:
  55.  *  Returns the window handle associated with this object.
  56.  *
  57.  * Parameters:
  58.  *  None
  59.  *
  60.  * Return Value:
  61.  *  HWND            Window handle for this object
  62.  */
  63.  
  64. HWND CWindow::Window(void)
  65.     {
  66.     return m_hWnd;
  67.     }
  68.